package com.hello.cron;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.kafka.core.KafkaTemplate;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

@Component
public class kafkacron {

    @Autowired
    private KafkaTemplate<String,Object> kafkaTemplate;

    @Scheduled(fixedRate = 15000)
    public boolean send(){
//        System.out.println("gfdfgfdg11111");
//        kafkaTemplate.send("testTopic","dfsdf");
        return true;
    }
}
